﻿Imports System.ComponentModel.DataAnnotations
Imports SistemaINCA.Models.Validators

Namespace Models.ViewModels

    Public Class DiaAsuetoModel

        Property IDAsueto As String

        <Required(ErrorMessageResourceName:="Error_Field_Required", ErrorMessageResourceType:=GetType(My.Resources.ErrorMessageResources))> _
        <RegularExpression("^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](201)\d$", ErrorMessageResourceName:="Error_Fechas_DataType", ErrorMessageResourceType:=GetType(My.Resources.ErrorMessageResources))> _
        <IsDate(ErrorMessageResourceName:="Error_Convert_Date", ErrorMessageResourceType:=GetType(My.Resources.ErrorMessageResources))> _
        <UIHint("CFecha")> _
        Property FechaInicio As String

        <Required(ErrorMessageResourceName:="Error_Field_Required", ErrorMessageResourceType:=GetType(My.Resources.ErrorMessageResources))> _
        <RegularExpression("^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](201)\d$", ErrorMessageResourceName:="Error_Fechas_DataType", ErrorMessageResourceType:=GetType(My.Resources.ErrorMessageResources))> _
        <IsDate(ErrorMessageResourceName:="Error_Convert_Date", ErrorMessageResourceType:=GetType(My.Resources.ErrorMessageResources))> _
        <CompareDateMayorOrIgual("FechaInicio", "Fecha de Inicio")> _
        <UIHint("CFecha")> _
        Property FechaFinal As String

        <Required(ErrorMessageResourceName:="Error_Field_Required", ErrorMessageResourceType:=GetType(My.Resources.ErrorMessageResources))> _
        Property Descripcion As String

        Property IsOneDay As Boolean
    End Class
End Namespace
